package com.yfbao.horizon.schedule.tk.entity;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;


@Getter
@Setter
//@Entity
//@EntityInfo(value = "分布式事务检查表", isPublic = true)
public class TrxTask implements Serializable {

//    @EntityAttribute(value = "全局唯一事务id")
//    @Column(name = "trx_id", nullable = false, columnDefinition = "SMALLINT COMMENT '全局唯一事务id'")
    private Long trxId;

//    @EntityAttribute(value = "服务名称", excludeFullTextSearch = true)
//    @Column(name = "service_name", nullable = false, columnDefinition = "SMALLINT COMMENT '服务名称'")
    private String serviceName;

//    @EntityAttribute(value = "调用类名", excludeFullTextSearch = true)
//    @Column(name = "class_name", nullable = false, columnDefinition = "SMALLINT COMMENT '调用类名'")
    private String className = "";

//    @EntityAttribute(value = "调用方法名", excludeFullTextSearch = true)
//    @Column(name = "method", nullable = false, columnDefinition = "SMALLINT COMMENT '调用方法名'")
    private String method = "";

//    @EntityAttribute(value = "参数内容", excludeFullTextSearch = true)
//    @Column(name = "param_data", nullable = false, columnDefinition = "SMALLINT COMMENT '参数内容'")
    private String paramData;

//    @EntityAttribute(value = "参数个数", excludeFullTextSearch = true)
//    @Column(name = "param_size", nullable = false, columnDefinition = "SMALLINT COMMENT '参数个数'")
    private Integer paramSize;

//    @EntityAttribute(value = "重试次数", excludeFullTextSearch = true)
//    @Column(name = "retry_time", nullable = false, columnDefinition = "SMALLINT COMMENT '重试次数'")
    private Integer retryTime = 0;

    /**
     *  0 未执行，1 运行中，2运行失败待重试
     */
//    @EntityAttribute(value = "任务状态", excludeFullTextSearch = true)
//    @Column(name = "task_status", nullable = false, columnDefinition = "SMALLINT COMMENT '任务状态'")
    private Integer taskStatus = 0;

//    @EntityAttribute(value = "待回滚数据", excludeFullTextSearch = true)
//    @Column(name = "rollback_data", nullable = false, columnDefinition = "SMALLINT COMMENT '待回滚数据'")
//    private String rollBackData = "";
//
//    /**
//     * 0 未回滚，1回滚失败，2回滚成功
//     */
//    @EntityAttribute(value = "回滚状态", excludeFullTextSearch = true)
//    @Column(name = "rollback_status", nullable = false, columnDefinition = "SMALLINT COMMENT '回滚状态'")
//    private int rollbackStatus = 0;
}
